<template>
<view class="select_bt">
	<u-input
		class="u-input"
		v-model="type" 
		height="60" 
		type="select" 
		:border="true" 
		@click="show = true" 
		:custom-style="{
			width:'100%',
			marginRight:'0',
		}"/>
	<u-action-sheet 
		:list="dataList" 
		v-model="show" 
		@click="onClick">
	</u-action-sheet>
</view>
</template>

<script>
//类型选择input组件
export default {
    name:"SelectTypeInputCp",
    props:{
        value:{
            type:String,
            default:'',
        },
    },
    data() {
        return {
            show: false,  //控制组件的显示
			dataList: [
				{
					text: '加快前期'
				},
				{
					text: '续建'
				},
				{
					text: '新开工'
				},
			],
        }
    },
    computed:{
        type:{
            get(){
                return this.value;
            },
            set(value){
                this.$emit('input',value);
            },
        },
    },
    methods:{
        onClick(index) {
        	this.type = this.dataList[index].text;
			this.$emit('onChange',this.type);
        },
    },
}
</script>

<style lang="scss" scoped>
.select_date_input_cp {
    text-align: center;
    width: 100%;
    /deep/.u-input{
        width: 100%;
    }
}
</style>
